import { SocketService } from "src/socket/SocketService";
export abstract class SocketOption {

  heartBeatDelay = 20000;
  serverResponseDelay = 10000;
  reconnectDelay = 5000;
  maxReconnectTime = 20;

  abstract uri: string;
  abstract msgHandler: { [p: string]: (res: any) => void };

  isHeartBeatMessage: (msg: { type: string }) => boolean = (msg: { type: string }) => msg.type === "NORMAL_HEART";
  createHeartBeatMessage: (() => string) | undefined = undefined;
  onSendHeartBeat?: (service: SocketService) => void;
}
